package learn.emp02.ex37;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int positiveCount = 0;
        int negativeCount = 0;
        int sum = 0;
        int totalNumbers = 0;
        while (scanner.hasNext()) {
            int num = scanner.nextInt();
            if (num == 0) {
                break;
            }
            if (num > 0) {
                positiveCount++;
            } else if (num < 0) {
                negativeCount++;
            }
            sum += num;
            totalNumbers++;
        }
        System.out.println(positiveCount);
        System.out.println(negativeCount);
        System.out.println(sum);
        if (totalNumbers > 0) {
            double average = (double) sum / totalNumbers;
            System.out.println(average);
        } else {
            System.out.println(0.0);
        }

        scanner.close();
    }
}
